package com.tanhua.server;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

import java.io.IOException;

@MapperScan("com.tanhua.common.mapper") // 设置mapper接口的扫描包
@SpringBootApplication(exclude = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class}) // 排除MongoDB的自动配置
@ComponentScan(basePackages = "com.tanhua")// 将几个类提取后,Application默认扫描与自身同目录的service包不够用了,用这个注解可以扫描到sso和common及其他所有模块的的service包
public class ServerApplication {
    public static void main(String[] args) throws IOException {
        SpringApplication.run(ServerApplication.class, args);
    }
}